<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
    <meta charset="utf-8"/>
    <title>Swoole-API-文档</title>
    <meta name="author" content=""/>
    <meta name="description" content=""/>

    <link href="../css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
    <link href="../css/font-awesome.min.css" rel="stylesheet">
    <link href="../css/prism.css" rel="stylesheet" media="all"/>
    <link href="../css/template.css" rel="stylesheet" media="all"/>
    
    <!--[if lt IE 9]>
    <script src="../js/html5.js"></script>
    <![endif]-->
    <script src="../js/jquery-1.11.0.min.js"></script>
    <script src="../js/ui/1.10.4/jquery-ui.min.js"></script>
    <script src="../js/bootstrap.min.js"></script>
    <script src="../js/jquery.smooth-scroll.js"></script>
    <script src="../js/prism.min.js"></script>
    <!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
    
    <link rel="shortcut icon" href="../images/favicon.ico"/>
    <link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
    <link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
    <link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>

<div class="navbar navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container">
            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <i class="icon-ellipsis-vertical"></i>
            </a>
            <a class="brand" href="../index.html">Swoole-API-文档</a>

            <div class="nav-collapse">
                <ul class="nav pull-right">
                                        <li class="dropdown">
                        <a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
                            API Documentation <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                                                        <li><a href="../namespaces/Swoole.html">\Swoole</a></li>
                                                    </ul>
                    </li>
                                        <li class="dropdown" id="charts-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            Charts <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li>
                                <a href="../graphs/class.html">
                                    <i class="icon-list-alt"></i>&#160;Class hierarchy diagram
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="dropdown" id="reports-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            Reports <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li>
                                <a href="../reports/errors.html">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">71</span>
                                </a>
                            </li>
                            <li>
                                <a href="../reports/markers.html">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">0</span>
                                </a>
                            </li>
                            <li>
                                <a href="../reports/deprecated.html">
                                                                                                            <i class="icon-list-alt"></i>&#160;Deprecated <span class="label label-info pull-right">0</span>
                                </a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <!--<div class="go_to_top">-->
    <!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
    <!--</div>-->
</div>

<div id="___" class="container-fluid">
        <section class="row-fluid">
        <div class="span2 sidebar">
                                <div class="accordion" style="margin-bottom: 0">
        <div class="accordion-group">
            <div class="accordion-heading">
                                    <a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1168763838"></a>
                                <a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
            </div>
            <div id="namespace-1168763838" class="accordion-body collapse in">
                <div class="accordion-inner">

                                                    <div class="accordion" style="margin-bottom: 0">
        <div class="accordion-group">
            <div class="accordion-heading">
                                    <a class="accordion-toggle collapsed" data-toggle="collapse" data-target="#namespace-1531422765"></a>
                                <a href="../namespaces/Swoole.html" style="margin-left: 30px; padding-left: 0">Swoole</a>
            </div>
            <div id="namespace-1531422765" class="accordion-body collapse ">
                <div class="accordion-inner">

                                                    <div class="accordion" style="margin-bottom: 0">
        <div class="accordion-group">
            <div class="accordion-heading">
                                    <a class="accordion-toggle collapsed" data-toggle="collapse" data-target="#namespace-2023594362"></a>
                                <a href="../namespaces/Swoole.Http.html" style="margin-left: 30px; padding-left: 0">Http</a>
            </div>
            <div id="namespace-2023594362" class="accordion-body collapse ">
                <div class="accordion-inner">

                    
                    <ul>
                                                                                                    <li class="class"><a href="../classes/Swoole.Http.Client.html">Client</a></li>
                                                    <li class="class"><a href="../classes/Swoole.Http.Request.html">Request</a></li>
                                                    <li class="class"><a href="../classes/Swoole.Http.Response.html">Response</a></li>
                                                    <li class="class"><a href="../classes/Swoole.Http.Server.html">Server</a></li>
                                            </ul>
                </div>
            </div>
        </div>
    </div>

                                                    <div class="accordion" style="margin-bottom: 0">
        <div class="accordion-group">
            <div class="accordion-heading">
                                    <a class="accordion-toggle collapsed" data-toggle="collapse" data-target="#namespace-1608912630"></a>
                                <a href="../namespaces/Swoole.WebSocket.html" style="margin-left: 30px; padding-left: 0">WebSocket</a>
            </div>
            <div id="namespace-1608912630" class="accordion-body collapse ">
                <div class="accordion-inner">

                    
                    <ul>
                                                                                                    <li class="class"><a href="../classes/Swoole.WebSocket.Frame.html">Frame</a></li>
                                                    <li class="class"><a href="../classes/Swoole.WebSocket.Server.html">Server</a></li>
                                            </ul>
                </div>
            </div>
        </div>
    </div>

                    
                    <ul>
                                                                                                    <li class="class"><a href="../classes/Swoole.Atomic.html">Atomic</a></li>
                                                    <li class="class"><a href="../classes/Swoole.Buffer.html">Buffer</a></li>
                                                    <li class="class"><a href="../classes/Swoole.Client.html">Client</a></li>
                                                    <li class="class"><a href="../classes/Swoole.Lock.html">Lock</a></li>
                                                    <li class="class"><a href="../classes/Swoole.Process.html">Process</a></li>
                                                    <li class="class"><a href="../classes/Swoole.Redis.html">Redis</a></li>
                                                    <li class="class"><a href="../classes/Swoole.Server.html">Server</a></li>
                                                    <li class="class"><a href="../classes/Swoole.Table.html">Table</a></li>
                                                    <li class="class"><a href="../classes/Swoole.Timer.html">Timer</a></li>
                                            </ul>
                </div>
            </div>
        </div>
    </div>

                    
                    <ul>
                                                                                                    <li class="class"><a href="../classes/swoole_atomic.html">swoole_atomic</a></li>
                                                    <li class="class"><a href="../classes/swoole_buffer.html">swoole_buffer</a></li>
                                                    <li class="class"><a href="../classes/swoole_client.html">swoole_client</a></li>
                                                    <li class="class"><a href="../classes/swoole_http_client.html">swoole_http_client</a></li>
                                                    <li class="class"><a href="../classes/swoole_http_request.html">swoole_http_request</a></li>
                                                    <li class="class"><a href="../classes/swoole_http_response.html">swoole_http_response</a></li>
                                                    <li class="class"><a href="../classes/swoole_http_server.html">swoole_http_server</a></li>
                                                    <li class="class"><a href="../classes/swoole_lock.html">swoole_lock</a></li>
                                                    <li class="class"><a href="../classes/swoole_process.html">swoole_process</a></li>
                                                    <li class="class"><a href="../classes/swoole_redis.html">swoole_redis</a></li>
                                                    <li class="class"><a href="../classes/swoole_server.html">swoole_server</a></li>
                                                    <li class="class"><a href="../classes/swoole_server_port.html">swoole_server_port</a></li>
                                                    <li class="class"><a href="../classes/swoole_table.html">swoole_table</a></li>
                                                    <li class="class"><a href="../classes/swoole_websocket_server.html">swoole_websocket_server</a></li>
                                            </ul>
                </div>
            </div>
        </div>
    </div>

        </div>
    </section>
    <section class="row-fluid">
        <div class="span10 offset2">
            <div class="row-fluid">
                <div class="span8 content namespace">
                    <nav>
                                                
                                            </nav>
                    <h1><small></small>\</h1>

                                        <h2>Namespaces</h2>
                    <table class="table table-hover">
                                                    <tr>
                                <td><a href="../namespaces/Swoole.html">Swoole</a></td>
                            </tr>
                                            </table>
                    
                    
                    
                                        <h2>Classes</h2>
                    <table class="table table-hover">
                                            <tr>
                            <td><a href="../classes/swoole_atomic.html">swoole_atomic</a></td>
                            <td><em>Class swoole_atomic</em></td>
                        </tr>
                                            <tr>
                            <td><a href="../classes/swoole_buffer.html">swoole_buffer</a></td>
                            <td><em>Class swoole_buffer</em></td>
                        </tr>
                                            <tr>
                            <td><a href="../classes/swoole_client.html">swoole_client</a></td>
                            <td><em>swoole_client</em></td>
                        </tr>
                                            <tr>
                            <td><a href="../classes/swoole_http_client.html">swoole_http_client</a></td>
                            <td><em>swoole_http_client</em></td>
                        </tr>
                                            <tr>
                            <td><a href="../classes/swoole_http_request.html">swoole_http_request</a></td>
                            <td><em>Http请求对象
Class swoole_http_request</em></td>
                        </tr>
                                            <tr>
                            <td><a href="../classes/swoole_http_response.html">swoole_http_response</a></td>
                            <td><em>Http响应对象
Class swoole_http_response</em></td>
                        </tr>
                                            <tr>
                            <td><a href="../classes/swoole_http_server.html">swoole_http_server</a></td>
                            <td><em>Class swoole_http_server</em></td>
                        </tr>
                                            <tr>
                            <td><a href="../classes/swoole_lock.html">swoole_lock</a></td>
                            <td><em>Class swoole_lock</em></td>
                        </tr>
                                            <tr>
                            <td><a href="../classes/swoole_process.html">swoole_process</a></td>
                            <td><em>swoole进程管理类
内置IPC通信支持，子进程和主进程之间可以方便的通信
支持标准输入输出重定向，子进程内echo，会发送到管道中，而不是输出屏幕
Class swoole_process</em></td>
                        </tr>
                                            <tr>
                            <td><a href="../classes/swoole_redis.html">swoole_redis</a></td>
                            <td><em>异步Redis客户端</em></td>
                        </tr>
                                            <tr>
                            <td><a href="../classes/swoole_server.html">swoole_server</a></td>
                            <td><em>Class swoole_server</em></td>
                        </tr>
                                            <tr>
                            <td><a href="../classes/swoole_server_port.html">swoole_server_port</a></td>
                            <td><em>Class swoole_server_port</em></td>
                        </tr>
                                            <tr>
                            <td><a href="../classes/swoole_table.html">swoole_table</a></td>
                            <td><em>内存表</em></td>
                        </tr>
                                            <tr>
                            <td><a href="../classes/swoole_websocket_server.html">swoole_websocket_server</a></td>
                            <td><em>Class swoole_http_server</em></td>
                        </tr>
                                        </table>
                                    </div>

                <aside class="span4 detailsbar">
                    <dl>
                        <dt>Namespace hierarchy</dt>
                        <dd class="hierarchy">
                                                                                                                                                <div class="namespace-wrapper">\</div>
                        </dd>
                    </dl>
                </aside>
            </div>

                        <div class="row-fluid">
                <section class="span8 content namespace">
                    <h2>Constants</h2>
                </section>
                <aside class="span4 detailsbar"></aside>
            </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_HTTP_GLOBAL_ALL" name="constant_HTTP_GLOBAL_ALL" class="anchor"></a>
            <article id="constant_HTTP_GLOBAL_ALL" class="constant">
                <h3 class="">HTTP_GLOBAL_ALL</h3>
                <pre class="signature">HTTP_GLOBAL_ALL</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_HTTP_GLOBAL_COOKIE" name="constant_HTTP_GLOBAL_COOKIE" class="anchor"></a>
            <article id="constant_HTTP_GLOBAL_COOKIE" class="constant">
                <h3 class="">HTTP_GLOBAL_COOKIE</h3>
                <pre class="signature">HTTP_GLOBAL_COOKIE</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_HTTP_GLOBAL_GET" name="constant_HTTP_GLOBAL_GET" class="anchor"></a>
            <article id="constant_HTTP_GLOBAL_GET" class="constant">
                <h3 class="">HTTP_GLOBAL_GET</h3>
                <pre class="signature">HTTP_GLOBAL_GET</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_HTTP_GLOBAL_POST" name="constant_HTTP_GLOBAL_POST" class="anchor"></a>
            <article id="constant_HTTP_GLOBAL_POST" class="constant">
                <h3 class="">HTTP_GLOBAL_POST</h3>
                <pre class="signature">HTTP_GLOBAL_POST</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_ASYNC" name="constant_SWOOLE_ASYNC" class="anchor"></a>
            <article id="constant_SWOOLE_ASYNC" class="constant">
                <h3 class="">SWOOLE_ASYNC</h3>
                <pre class="signature">SWOOLE_ASYNC</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_BASE" name="constant_SWOOLE_BASE" class="anchor"></a>
            <article id="constant_SWOOLE_BASE" class="constant">
                <h3 class="">SWOOLE_BASE</h3>
                <pre class="signature">SWOOLE_BASE</pre>
                <p><em>new swoole_server 构造函数参数</em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_DTLSv1_CLIENT_METHOD" name="constant_SWOOLE_DTLSv1_CLIENT_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_DTLSv1_CLIENT_METHOD" class="constant">
                <h3 class="">SWOOLE_DTLSv1_CLIENT_METHOD</h3>
                <pre class="signature">SWOOLE_DTLSv1_CLIENT_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_DTLSv1_METHOD" name="constant_SWOOLE_DTLSv1_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_DTLSv1_METHOD" class="constant">
                <h3 class="">SWOOLE_DTLSv1_METHOD</h3>
                <pre class="signature">SWOOLE_DTLSv1_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_DTLSv1_SERVER_METHOD" name="constant_SWOOLE_DTLSv1_SERVER_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_DTLSv1_SERVER_METHOD" class="constant">
                <h3 class="">SWOOLE_DTLSv1_SERVER_METHOD</h3>
                <pre class="signature">SWOOLE_DTLSv1_SERVER_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_EVENT_READ" name="constant_SWOOLE_EVENT_READ" class="anchor"></a>
            <article id="constant_SWOOLE_EVENT_READ" class="constant">
                <h3 class="">SWOOLE_EVENT_READ</h3>
                <pre class="signature">SWOOLE_EVENT_READ</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_EVENT_WRITE" name="constant_SWOOLE_EVENT_WRITE" class="anchor"></a>
            <article id="constant_SWOOLE_EVENT_WRITE" class="constant">
                <h3 class="">SWOOLE_EVENT_WRITE</h3>
                <pre class="signature">SWOOLE_EVENT_WRITE</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_FILELOCK" name="constant_SWOOLE_FILELOCK" class="anchor"></a>
            <article id="constant_SWOOLE_FILELOCK" class="constant">
                <h3 class="">SWOOLE_FILELOCK</h3>
                <pre class="signature">SWOOLE_FILELOCK</pre>
                <p><em>new swoole_lock构造函数参数</em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_KEEP" name="constant_SWOOLE_KEEP" class="anchor"></a>
            <article id="constant_SWOOLE_KEEP" class="constant">
                <h3 class="">SWOOLE_KEEP</h3>
                <pre class="signature">SWOOLE_KEEP</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_MUTEX" name="constant_SWOOLE_MUTEX" class="anchor"></a>
            <article id="constant_SWOOLE_MUTEX" class="constant">
                <h3 class="">SWOOLE_MUTEX</h3>
                <pre class="signature">SWOOLE_MUTEX</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_PACKET" name="constant_SWOOLE_PACKET" class="anchor"></a>
            <article id="constant_SWOOLE_PACKET" class="constant">
                <h3 class="">SWOOLE_PACKET</h3>
                <pre class="signature">SWOOLE_PACKET</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_PROCESS" name="constant_SWOOLE_PROCESS" class="anchor"></a>
            <article id="constant_SWOOLE_PROCESS" class="constant">
                <h3 class="">SWOOLE_PROCESS</h3>
                <pre class="signature">SWOOLE_PROCESS</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_RWLOCK" name="constant_SWOOLE_RWLOCK" class="anchor"></a>
            <article id="constant_SWOOLE_RWLOCK" class="constant">
                <h3 class="">SWOOLE_RWLOCK</h3>
                <pre class="signature">SWOOLE_RWLOCK</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SEM" name="constant_SWOOLE_SEM" class="anchor"></a>
            <article id="constant_SWOOLE_SEM" class="constant">
                <h3 class="">SWOOLE_SEM</h3>
                <pre class="signature">SWOOLE_SEM</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SOCK_ASYNC" name="constant_SWOOLE_SOCK_ASYNC" class="anchor"></a>
            <article id="constant_SWOOLE_SOCK_ASYNC" class="constant">
                <h3 class="">SWOOLE_SOCK_ASYNC</h3>
                <pre class="signature">SWOOLE_SOCK_ASYNC</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SOCK_SYNC" name="constant_SWOOLE_SOCK_SYNC" class="anchor"></a>
            <article id="constant_SWOOLE_SOCK_SYNC" class="constant">
                <h3 class="">SWOOLE_SOCK_SYNC</h3>
                <pre class="signature">SWOOLE_SOCK_SYNC</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SOCK_TCP" name="constant_SWOOLE_SOCK_TCP" class="anchor"></a>
            <article id="constant_SWOOLE_SOCK_TCP" class="constant">
                <h3 class="">SWOOLE_SOCK_TCP</h3>
                <pre class="signature">SWOOLE_SOCK_TCP</pre>
                <p><em>new swoole_client 构造函数参数</em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SOCK_TCP6" name="constant_SWOOLE_SOCK_TCP6" class="anchor"></a>
            <article id="constant_SWOOLE_SOCK_TCP6" class="constant">
                <h3 class="">SWOOLE_SOCK_TCP6</h3>
                <pre class="signature">SWOOLE_SOCK_TCP6</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SOCK_UDP" name="constant_SWOOLE_SOCK_UDP" class="anchor"></a>
            <article id="constant_SWOOLE_SOCK_UDP" class="constant">
                <h3 class="">SWOOLE_SOCK_UDP</h3>
                <pre class="signature">SWOOLE_SOCK_UDP</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SOCK_UDP6" name="constant_SWOOLE_SOCK_UDP6" class="anchor"></a>
            <article id="constant_SWOOLE_SOCK_UDP6" class="constant">
                <h3 class="">SWOOLE_SOCK_UDP6</h3>
                <pre class="signature">SWOOLE_SOCK_UDP6</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SOCK_UNIX_DGRAM" name="constant_SWOOLE_SOCK_UNIX_DGRAM" class="anchor"></a>
            <article id="constant_SWOOLE_SOCK_UNIX_DGRAM" class="constant">
                <h3 class="">SWOOLE_SOCK_UNIX_DGRAM</h3>
                <pre class="signature">SWOOLE_SOCK_UNIX_DGRAM</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SOCK_UNIX_STREAM" name="constant_SWOOLE_SOCK_UNIX_STREAM" class="anchor"></a>
            <article id="constant_SWOOLE_SOCK_UNIX_STREAM" class="constant">
                <h3 class="">SWOOLE_SOCK_UNIX_STREAM</h3>
                <pre class="signature">SWOOLE_SOCK_UNIX_STREAM</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SPINLOCK" name="constant_SWOOLE_SPINLOCK" class="anchor"></a>
            <article id="constant_SWOOLE_SPINLOCK" class="constant">
                <h3 class="">SWOOLE_SPINLOCK</h3>
                <pre class="signature">SWOOLE_SPINLOCK</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SSL" name="constant_SWOOLE_SSL" class="anchor"></a>
            <article id="constant_SWOOLE_SSL" class="constant">
                <h3 class="">SWOOLE_SSL</h3>
                <pre class="signature">SWOOLE_SSL</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SSLv23_CLIENT_METHOD" name="constant_SWOOLE_SSLv23_CLIENT_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_SSLv23_CLIENT_METHOD" class="constant">
                <h3 class="">SWOOLE_SSLv23_CLIENT_METHOD</h3>
                <pre class="signature">SWOOLE_SSLv23_CLIENT_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SSLv23_METHOD" name="constant_SWOOLE_SSLv23_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_SSLv23_METHOD" class="constant">
                <h3 class="">SWOOLE_SSLv23_METHOD</h3>
                <pre class="signature">SWOOLE_SSLv23_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SSLv23_SERVER_METHOD" name="constant_SWOOLE_SSLv23_SERVER_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_SSLv23_SERVER_METHOD" class="constant">
                <h3 class="">SWOOLE_SSLv23_SERVER_METHOD</h3>
                <pre class="signature">SWOOLE_SSLv23_SERVER_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SSLv3_CLIENT_METHOD" name="constant_SWOOLE_SSLv3_CLIENT_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_SSLv3_CLIENT_METHOD" class="constant">
                <h3 class="">SWOOLE_SSLv3_CLIENT_METHOD</h3>
                <pre class="signature">SWOOLE_SSLv3_CLIENT_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SSLv3_METHOD" name="constant_SWOOLE_SSLv3_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_SSLv3_METHOD" class="constant">
                <h3 class="">SWOOLE_SSLv3_METHOD</h3>
                <pre class="signature">SWOOLE_SSLv3_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SSLv3_SERVER_METHOD" name="constant_SWOOLE_SSLv3_SERVER_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_SSLv3_SERVER_METHOD" class="constant">
                <h3 class="">SWOOLE_SSLv3_SERVER_METHOD</h3>
                <pre class="signature">SWOOLE_SSLv3_SERVER_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_SYNC" name="constant_SWOOLE_SYNC" class="anchor"></a>
            <article id="constant_SWOOLE_SYNC" class="constant">
                <h3 class="">SWOOLE_SYNC</h3>
                <pre class="signature">SWOOLE_SYNC</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_TCP" name="constant_SWOOLE_TCP" class="anchor"></a>
            <article id="constant_SWOOLE_TCP" class="constant">
                <h3 class="">SWOOLE_TCP</h3>
                <pre class="signature">SWOOLE_TCP</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_TCP6" name="constant_SWOOLE_TCP6" class="anchor"></a>
            <article id="constant_SWOOLE_TCP6" class="constant">
                <h3 class="">SWOOLE_TCP6</h3>
                <pre class="signature">SWOOLE_TCP6</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_THREAD" name="constant_SWOOLE_THREAD" class="anchor"></a>
            <article id="constant_SWOOLE_THREAD" class="constant">
                <h3 class="">SWOOLE_THREAD</h3>
                <pre class="signature">SWOOLE_THREAD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_TLSv1_1_CLIENT_METHOD" name="constant_SWOOLE_TLSv1_1_CLIENT_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_TLSv1_1_CLIENT_METHOD" class="constant">
                <h3 class="">SWOOLE_TLSv1_1_CLIENT_METHOD</h3>
                <pre class="signature">SWOOLE_TLSv1_1_CLIENT_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_TLSv1_1_METHOD" name="constant_SWOOLE_TLSv1_1_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_TLSv1_1_METHOD" class="constant">
                <h3 class="">SWOOLE_TLSv1_1_METHOD</h3>
                <pre class="signature">SWOOLE_TLSv1_1_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_TLSv1_1_SERVER_METHOD" name="constant_SWOOLE_TLSv1_1_SERVER_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_TLSv1_1_SERVER_METHOD" class="constant">
                <h3 class="">SWOOLE_TLSv1_1_SERVER_METHOD</h3>
                <pre class="signature">SWOOLE_TLSv1_1_SERVER_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_TLSv1_2_CLIENT_METHOD" name="constant_SWOOLE_TLSv1_2_CLIENT_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_TLSv1_2_CLIENT_METHOD" class="constant">
                <h3 class="">SWOOLE_TLSv1_2_CLIENT_METHOD</h3>
                <pre class="signature">SWOOLE_TLSv1_2_CLIENT_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_TLSv1_2_METHOD" name="constant_SWOOLE_TLSv1_2_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_TLSv1_2_METHOD" class="constant">
                <h3 class="">SWOOLE_TLSv1_2_METHOD</h3>
                <pre class="signature">SWOOLE_TLSv1_2_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_TLSv1_2_SERVER_METHOD" name="constant_SWOOLE_TLSv1_2_SERVER_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_TLSv1_2_SERVER_METHOD" class="constant">
                <h3 class="">SWOOLE_TLSv1_2_SERVER_METHOD</h3>
                <pre class="signature">SWOOLE_TLSv1_2_SERVER_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_TLSv1_CLIENT_METHOD" name="constant_SWOOLE_TLSv1_CLIENT_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_TLSv1_CLIENT_METHOD" class="constant">
                <h3 class="">SWOOLE_TLSv1_CLIENT_METHOD</h3>
                <pre class="signature">SWOOLE_TLSv1_CLIENT_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_TLSv1_METHOD" name="constant_SWOOLE_TLSv1_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_TLSv1_METHOD" class="constant">
                <h3 class="">SWOOLE_TLSv1_METHOD</h3>
                <pre class="signature">SWOOLE_TLSv1_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_TLSv1_SERVER_METHOD" name="constant_SWOOLE_TLSv1_SERVER_METHOD" class="anchor"></a>
            <article id="constant_SWOOLE_TLSv1_SERVER_METHOD" class="constant">
                <h3 class="">SWOOLE_TLSv1_SERVER_METHOD</h3>
                <pre class="signature">SWOOLE_TLSv1_SERVER_METHOD</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_UDP" name="constant_SWOOLE_UDP" class="anchor"></a>
            <article id="constant_SWOOLE_UDP" class="constant">
                <h3 class="">SWOOLE_UDP</h3>
                <pre class="signature">SWOOLE_UDP</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_UDP6" name="constant_SWOOLE_UDP6" class="anchor"></a>
            <article id="constant_SWOOLE_UDP6" class="constant">
                <h3 class="">SWOOLE_UDP6</h3>
                <pre class="signature">SWOOLE_UDP6</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_UNIX_DGRAM" name="constant_SWOOLE_UNIX_DGRAM" class="anchor"></a>
            <article id="constant_SWOOLE_UNIX_DGRAM" class="constant">
                <h3 class="">SWOOLE_UNIX_DGRAM</h3>
                <pre class="signature">SWOOLE_UNIX_DGRAM</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_UNIX_STREAM" name="constant_SWOOLE_UNIX_STREAM" class="anchor"></a>
            <article id="constant_SWOOLE_UNIX_STREAM" class="constant">
                <h3 class="">SWOOLE_UNIX_STREAM</h3>
                <pre class="signature">SWOOLE_UNIX_STREAM</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_SWOOLE_VERSION" name="constant_SWOOLE_VERSION" class="anchor"></a>
            <article id="constant_SWOOLE_VERSION" class="constant">
                <h3 class="">SWOOLE_VERSION</h3>
                <pre class="signature">SWOOLE_VERSION</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_WEBSOCKET_OPCODE_BINARY" name="constant_WEBSOCKET_OPCODE_BINARY" class="anchor"></a>
            <article id="constant_WEBSOCKET_OPCODE_BINARY" class="constant">
                <h3 class="">WEBSOCKET_OPCODE_BINARY</h3>
                <pre class="signature">WEBSOCKET_OPCODE_BINARY</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_WEBSOCKET_OPCODE_TEXT" name="constant_WEBSOCKET_OPCODE_TEXT" class="anchor"></a>
            <article id="constant_WEBSOCKET_OPCODE_TEXT" class="constant">
                <h3 class="">WEBSOCKET_OPCODE_TEXT</h3>
                <pre class="signature">WEBSOCKET_OPCODE_TEXT</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_WEBSOCKET_STATUS_ACTIVE" name="constant_WEBSOCKET_STATUS_ACTIVE" class="anchor"></a>
            <article id="constant_WEBSOCKET_STATUS_ACTIVE" class="constant">
                <h3 class="">WEBSOCKET_STATUS_ACTIVE</h3>
                <pre class="signature">WEBSOCKET_STATUS_ACTIVE</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_WEBSOCKET_STATUS_CONNECTION" name="constant_WEBSOCKET_STATUS_CONNECTION" class="anchor"></a>
            <article id="constant_WEBSOCKET_STATUS_CONNECTION" class="constant">
                <h3 class="">WEBSOCKET_STATUS_CONNECTION</h3>
                <pre class="signature">WEBSOCKET_STATUS_CONNECTION</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_WEBSOCKET_STATUS_FRAME" name="constant_WEBSOCKET_STATUS_FRAME" class="anchor"></a>
            <article id="constant_WEBSOCKET_STATUS_FRAME" class="constant">
                <h3 class="">WEBSOCKET_STATUS_FRAME</h3>
                <pre class="signature">WEBSOCKET_STATUS_FRAME</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="constant_WEBSOCKET_STATUS_HANDSHAKE" name="constant_WEBSOCKET_STATUS_HANDSHAKE" class="anchor"></a>
            <article id="constant_WEBSOCKET_STATUS_HANDSHAKE" class="constant">
                <h3 class="">WEBSOCKET_STATUS_HANDSHAKE</h3>
                <pre class="signature">WEBSOCKET_STATUS_HANDSHAKE</pre>
                <p><em></em></p>
                
            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                        <dl>
                                <dt>File</dt>
                <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                            
                        <div class="row-fluid">
                <section class="span8 content namespace">
                    <h2>Functions</h2>
                </section>
                <aside class="span4 detailsbar"></aside>
            </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_async_dns_lookup" name="method_swoole_async_dns_lookup" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_async_dns_lookup()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_async_dns_lookup(string  <span class="argument">$domain</span>, callback  <span class="argument">$callback</span>) </pre>
                <p><em>将域名解析为IP地址
调用此函数会立即返回，当DNS查询完成时，自动回调指定的callback函数</em></p>
                <p>callback($host, $ip)</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td>string</td>
                                <td>$domain </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>callback</td>
                                <td>$callback </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_async_read" name="method_swoole_async_read" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_async_read()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_async_read(string  <span class="argument">$filename</span>, mixed  <span class="argument">$callback</span>, integer  <span class="argument">$trunk_size = 8192</span>) : boolean</pre>
                <p><em>异步读文件</em></p>
                <p>使用此函数读取文件是非阻塞的，当读操作完成时会自动回调制定的函数
此函数与swoole_async_readfile不同，它是分段读取，可以用于读取超大文件。
每次只读 $trunk_size 个字节，不会占用太多内存</p>
<p>callback($filename, $content)
callback函数，可以通过return true/false，来控制是否继续读下一个trunk
return true，继续读取
return false，停止读取并关闭文件</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td>string</td>
                                <td>$filename </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>mixed</td>
                                <td>$callback </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>integer</td>
                                <td>$trunk_size </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    boolean
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_async_readfile" name="method_swoole_async_readfile" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_async_readfile()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_async_readfile(string  <span class="argument">$filename</span>, mixed  <span class="argument">$callback</span>) </pre>
                <p><em>异步读取文件内容
此函数调用后会马上返回，当文件读取完毕时会回调制定的callback函数。
callback( $filename, $content )</em></p>
                <p>swoole_async_readfile会将文件内容全部复制到内存，所以不能用于大文件的读取
如果要读取超大文件，请使用swoole_async_read函数
swoole_async_readfile最大可读取4M的文件，受限于SW_AIO_MAX_FILESIZE宏</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td>string</td>
                                <td>$filename </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>mixed</td>
                                <td>$callback </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_async_set" name="method_swoole_async_set" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_async_set()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_async_set(array  <span class="argument">$setting</span>) </pre>
                <p><em>设置异步相关的参数</em></p>
                

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td>array</td>
                                <td>$setting </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_async_write" name="method_swoole_async_write" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_async_write()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_async_write(string  <span class="argument">$filename</span>, string  <span class="argument">$content</span>, integer  <span class="argument">$offset</span>, mixed  <span class="argument">$callback = NULL</span>) : boolean</pre>
                <p><em>异步写文件</em></p>
                <p>与swoole_async_writefile不同，write是分段读写的。
不需要一次性将要写的内容放到内存里，所以只占用少量内存。
swoole_async_write通过传入的offset参数来确定写入的位置</p>
<p>callback($filename)</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td>string</td>
                                <td>$filename </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>string</td>
                                <td>$content </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>integer</td>
                                <td>$offset </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>mixed</td>
                                <td>$callback </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    boolean
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_async_writefile" name="method_swoole_async_writefile" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_async_writefile()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_async_writefile(string  <span class="argument">$filename</span>, string  <span class="argument">$content</span>, callback  <span class="argument">$callback</span>) </pre>
                <p><em>异步写文件，调用此函数后会立即返回, 当写入完成时会自动回调指定的callback函数
callback($filename)</em></p>
                <p>swoole_async_writefile最大可写入4M的文件
swoole_async_writefile可以不指定回调函数</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td>string</td>
                                <td>$filename </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>string</td>
                                <td>$content </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>callback</td>
                                <td>$callback </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_client_select" name="method_swoole_client_select" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_client_select()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_client_select(array  <span class="argument">$read</span>, array  <span class="argument">$write</span>, array  <span class="argument">$error</span>, float  <span class="argument">$timeout</span>) </pre>
                <p><em>IO事件循环</em></p>
                <p>swoole_client的并行处理中用了select来做IO事件循环。为什么要用select呢？
因为client一般不会有太多连接，而且大部分socket会很快接收到响应数据。
在少量连接的情况下select比epoll性能更好，另外select更简单。</p>
<p>$read,$write,$error分别是可读/可写/错误的文件描述符。
这3个参数必须是数组变量的引用。数组的元素必须为swoole_client对象。
$timeout参数是select的超时时间，单位为秒，接受浮点数。</p>
<p>调用成功后，会返回事件的数量，并修改$read/$write/$error数组。
使用foreach遍历数组，然后执行$item-&gt;recv/$item-&gt;send来收发数据。
或者调用$item-&gt;close()或unset($item)来关闭socket。</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td>array</td>
                                <td>$read </td>
                                <td><p>可读</p></td>
                            </tr>
                                                    <tr>
                                <td>array</td>
                                <td>$write </td>
                                <td><p>可写</p></td>
                            </tr>
                                                    <tr>
                                <td>array</td>
                                <td>$error </td>
                                <td><p>错误</p></td>
                            </tr>
                                                    <tr>
                                <td>float</td>
                                <td>$timeout </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_connection_info" name="method_swoole_connection_info" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_connection_info()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_connection_info(\swoole_server  <span class="argument">$serv</span>, integer  <span class="argument">$fd</span>) : array</pre>
                <p><em>获取客户端连接的信息</em></p>
                <p>返回数组含义:
from_id 来自哪个poll线程
from_fd 来自哪个server socket
from_port 来自哪个Server端口
remote_port 客户端连接的端口
remote_ip 客户端连接的ip</p>
<p>以下 v1.6.10 增加
connect_time 连接时间
last_time 最后一次发送数据的时间</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td><a href="../classes/swoole_server.html">\swoole_server</a></td>
                                <td>$serv </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>integer</td>
                                <td>$fd </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    array
                                            &mdash; <p>on success or false on failure.</p>
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_connection_list" name="method_swoole_connection_list" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_connection_list()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_connection_list(\swoole_server  <span class="argument">$serv</span>, integer  <span class="argument">$start_fd</span>, integer  <span class="argument">$pagesize = 10</span>) : array</pre>
                <p><em>遍历当前Server所有的客户端连接</em></p>
                <p>此函数接受3个参数，第一个参数是server的资源对象，第二个参数是起始fd，第三个参数是每页取多少条，最大不得超过100。
调用成功将返回一个数字索引数组，元素是取到的$fd。
数组会按从小到大排序，最后一个$fd作为新的start_fd再次尝试获取。</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td><a href="../classes/swoole_server.html">\swoole_server</a></td>
                                <td>$serv </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>integer</td>
                                <td>$start_fd </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>integer</td>
                                <td>$pagesize </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    array
                                            &mdash; <p>on success or false on failure</p>
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_errno" name="method_swoole_errno" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_errno()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_errno() : integer</pre>
                <p><em>获取最近一次系统调用的错误码，等同于C/C++的errno变量。</em></p>
                

                
                
                                    <h4>Returns</h4>
                    integer
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_event_add" name="method_swoole_event_add" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_event_add()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_event_add(integer  <span class="argument">$sock</span>,   <span class="argument">$read_callback = NULL</span>,   <span class="argument">$write_callback = NULL</span>,   <span class="argument">$flag = NULL</span>) : boolean</pre>
                <p><em>将Socket加入到swoole的reactor事件监听中</em></p>
                <p>此函数可以用在Server或Client模式下</p>
<p>参数1为socket的文件描述符；
参数2为回调函数，可以是字符串函数名、对象+方法、类静态方法或匿名函数，当此socket可读是回调制定的函数。</p>
<p>Server程序中会增加到server socket的reactor中。
Client程序中，如果是第一次调用此函数会自动创建一个reactor，并添加此socket，程序将在此处进行wait。
swoole_event_add函数之后的代码不会执行。当调用swoole_event_exit才会停止wait，程序继续向下执行。
第二次调用只增加此socket到reactor中，开始监听事件</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td>integer</td>
                                <td>$sock </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td></td>
                                <td>$read_callback </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td></td>
                                <td>$write_callback </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td></td>
                                <td>$flag </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    boolean
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_event_del" name="method_swoole_event_del" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_event_del()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_event_del(integer  <span class="argument">$sock</span>) : boolean</pre>
                <p><em>从reactor中移除监听的Socket</em></p>
                <p>swoole_event_del应当与 swoole_event_add 成对使用</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td>integer</td>
                                <td>$sock </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    boolean
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_event_exit" name="method_swoole_event_exit" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_event_exit()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_event_exit() : void</pre>
                <p><em>退出事件轮询</em></p>
                

                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_event_set" name="method_swoole_event_set" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_event_set()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_event_set(  <span class="argument">$sock</span>,   <span class="argument">$read_callback = NULL</span>, null  <span class="argument">$write_callback = NULL</span>, null  <span class="argument">$flag = NULL</span>) </pre>
                <p><em>修改socket的事件设置
可以修改可读/可写事件的回调设置和监听的事件类型</em></p>
                

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td></td>
                                <td>$sock </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td></td>
                                <td>$read_callback </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>null</td>
                                <td>$write_callback </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>null</td>
                                <td>$flag </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_event_wait" name="method_swoole_event_wait" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_event_wait()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_event_wait() : void</pre>
                <p><em>进行事件轮询</em></p>
                <p>PHP5.4之前的版本没有在ZendAPI中加入注册shutdown函数。所以swoole无法在脚本结尾处自动进行事件轮询。
低于5.4的版本，需要在你的PHP脚本结尾处加swoole_event_wait函数，使脚本开始进行事件轮询。</p>
<p>5.4或更高版本不需要加此函数。</p>

                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_event_write" name="method_swoole_event_write" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_event_write()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_event_write(mixed  <span class="argument">$socket</span>, string  <span class="argument">$data</span>) </pre>
                <p><em>异步写</em></p>
                

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td>mixed</td>
                                <td>$socket </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>string</td>
                                <td>$data </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_get_local_ip" name="method_swoole_get_local_ip" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_get_local_ip()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_get_local_ip() : array</pre>
                <p><em>此函数用于获取本机所有网络接口的IP地址，
目前只返回IPv4地址，返回结果会过滤掉本地loop地址127.0.0.1。
结果数组是以interface名称为key的关联数组。
比如 array(&quot;eth0&quot; =&gt; &quot;192.168.1.100&quot;)</em></p>
                

                
                
                                    <h4>Returns</h4>
                    array
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_get_mysqli_sock" name="method_swoole_get_mysqli_sock" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_get_mysqli_sock()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_get_mysqli_sock(\mysqli  <span class="argument">$db</span>) : integer</pre>
                <p><em>获取MySQLi的socket文件描述符</em></p>
                <p>可将mysql的socket增加到swoole中，执行异步MySQL查询。
如果想要使用异步MySQL，需要在编译swoole时制定--enable-async-mysql
swoole_get_mysqli_sock仅支持mysqlnd驱动，php5.4以下版本不支持此特性</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td>\mysqli</td>
                                <td>$db </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    integer
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_mysql_query" name="method_swoole_mysql_query" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_mysql_query()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_mysql_query(  <span class="argument">$db</span>,   <span class="argument">$sql</span>,   <span class="argument">$callback</span>) </pre>
                <p><em>异步执行SQL</em></p>
                

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td></td>
                                <td>$db </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td></td>
                                <td>$sql </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td></td>
                                <td>$callback </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_server_addlisten" name="method_swoole_server_addlisten" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_server_addlisten()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_server_addlisten(\swoole_server  <span class="argument">$serv</span>, string  <span class="argument">$host = &#039;127.0.0.1&#039;</span>, integer  <span class="argument">$port = 9502</span>) : void</pre>
                <p><em>增加监听的端口</em></p>
                <p>您可以混合使用UDP/TCP，同时监听内网和外网端口
业务代码中可以通过调用swoole_connection_info来获取某个连接来自于哪个端口</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td><a href="../classes/swoole_server.html">\swoole_server</a></td>
                                <td>$serv </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>string</td>
                                <td>$host </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>integer</td>
                                <td>$port </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_server_addtimer" name="method_swoole_server_addtimer" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_server_addtimer()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_server_addtimer(\swoole_server  <span class="argument">$serv</span>, integer  <span class="argument">$interval</span>) : boolean</pre>
                <p><em>设置定时器</em></p>
                <p>第二个参数是定时器的间隔时间，单位为毫秒。
swoole定时器的最小颗粒是1毫秒，支持多个定时器。
此函数可以用于worker进程中。或者通过swoole_server_set设置timer_interval来调整定时器最小间隔。</p>
<p>增加定时器后需要为Server设置onTimer回调函数，否则会造成严重错误。
多个定时器都会回调此函数。
在这个函数内需要自行switch，根据interval的值来判断是来自于哪个定时器。</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td><a href="../classes/swoole_server.html">\swoole_server</a></td>
                                <td>$serv </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>integer</td>
                                <td>$interval </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    boolean
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_server_close" name="method_swoole_server_close" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_server_close()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_server_close(\swoole_server  <span class="argument">$serv</span>, integer  <span class="argument">$fd</span>, integer  <span class="argument">$from_id</span>) : boolean</pre>
                <p><em>关闭客户端连接</em></p>
                <p>Server主动close连接，也一样会触发onClose事件。
不要在close之后写清理逻辑，应当放置到onClose回调中处理。</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td><a href="../classes/swoole_server.html">\swoole_server</a></td>
                                <td>$serv </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>integer</td>
                                <td>$fd </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>integer</td>
                                <td>$from_id </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    boolean
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_server_create" name="method_swoole_server_create" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_server_create()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_server_create(string  <span class="argument">$host</span>, integer  <span class="argument">$port</span>, integer  <span class="argument">$mode = SWOOLE_PROCESS</span>, integer  <span class="argument">$sock_type = SWOOLE_SOCK_TCP</span>) </pre>
                <p><em>创建一个swoole server资源对象</em></p>
                

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td>string</td>
                                <td>$host </td>
                                <td><p>参数用来指定监听的ip地址，如127.0.0.1，或者外网地址，或者0.0.0.0监听全部地址</p></td>
                            </tr>
                                                    <tr>
                                <td>integer</td>
                                <td>$port </td>
                                <td><p>监听的端口，如9501，监听小于1024端口需要root权限，如果此端口被占用server-start时会失败</p></td>
                            </tr>
                                                    <tr>
                                <td>integer</td>
                                <td>$mode </td>
                                <td><p>运行的模式，swoole提供了3种运行模式，默认为多进程模式</p></td>
                            </tr>
                                                    <tr>
                                <td>integer</td>
                                <td>$sock_type </td>
                                <td><p>指定socket的类型，支持TCP/UDP、TCP6/UDP64种</p></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_server_deltimer" name="method_swoole_server_deltimer" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_server_deltimer()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_server_deltimer(\swoole_server  <span class="argument">$serv</span>, integer  <span class="argument">$interval</span>) : void</pre>
                <p><em>删除定时器</em></p>
                <p>$interval 参数为定时器的间隔时间
根据定时器时间区分不同的定时器</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td><a href="../classes/swoole_server.html">\swoole_server</a></td>
                                <td>$serv </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>integer</td>
                                <td>$interval </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_server_finish" name="method_swoole_server_finish" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_server_finish()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_server_finish(\swoole_server  <span class="argument">$serv</span>, string  <span class="argument">$response</span>) : void</pre>
                <p><em>task_worker进程中通知worker进程，投递的任务已完成</em></p>
                <p>此函数可以传递结果数据给worker进程
使用swoole_server_finish函数必须为Server设置onFinish回调函数。此函数只可用于task_worker进程的onTask回调中
swoole_server_finish是可选的。如果worker进程不关心任务执行的结果，可以不调用此函数</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td><a href="../classes/swoole_server.html">\swoole_server</a></td>
                                <td>$serv </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>string</td>
                                <td>$response </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_server_handler" name="method_swoole_server_handler" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_server_handler()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_server_handler(\swoole_server  <span class="argument">$serv</span>, string  <span class="argument">$event_name</span>, callable  <span class="argument">$event_callback_function</span>) : boolean</pre>
                <p><em>设置Server的事件回调函数</em></p>
                <p>第一个参数是swoole的资源对象
第二个参数是回调的名称, 大小写不敏感，具体内容参考回调函数列表
第三个函数是回调的PHP函数，可以是字符串，数组，匿名函数。</p>
<p>设置成功后返回true。如果$event_name填写错误将返回false。</p>
<p>onConnect/onClose/onReceive 这3个回调函数必须设置，其他事件回调函数可选。
如果设定了timer定时器，onTimer事件回调函数也必须设置</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td><a href="../classes/swoole_server.html">\swoole_server</a></td>
                                <td>$serv </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>string</td>
                                <td>$event_name </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>callable</td>
                                <td>$event_callback_function </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    boolean
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_server_reload" name="method_swoole_server_reload" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_server_reload()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_server_reload(\swoole_server  <span class="argument">$serv</span>) : void</pre>
                <p><em>平滑重启Server</em></p>
                <p>一台繁忙的后端服务器随时都在处理请求，如果管理员通过kill进程方式来终止/重启服务器程序，可能导致刚好代码执行到一半终止。
这种情况下会产生数据的不一致。如交易系统中，支付逻辑的下一段是发货，假设在支付逻辑之后进程被终止了。
会导致用户支付了货币，但并没有发货，后果非常严重。</p>
<p>Swoole提供了柔性终止/重启的机制，管理员只需要向SwooleServer发送特定的信号，Server的worker进程可以安全的结束。</p>
<p>SIGTREM: 向主进程发送此信号服务器将安全终止
SIGUSR1: 向管理进程发送SIGUSR1信号，将平稳地restart所有worker进程，在PHP代码中可以调用swoole_server_reload($serv)完成此操作</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td><a href="../classes/swoole_server.html">\swoole_server</a></td>
                                <td>$serv </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_server_send" name="method_swoole_server_send" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_server_send()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_server_send(\swoole_server  <span class="argument">$serv</span>, integer  <span class="argument">$fd</span>, string  <span class="argument">$data</span>, integer  <span class="argument">$from_id</span>) : boolean</pre>
                <p><em>向客户端发送数据</em></p>
                <p>$data的长度可以是任意的。扩展函数内会进行切分。
如果是UDP协议，会直接在worker进程内发送数据包。
发送成功会返回true，如果连接已被关闭或发送失败会返回false.</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td><a href="../classes/swoole_server.html">\swoole_server</a></td>
                                <td>$serv </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>integer</td>
                                <td>$fd </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>string</td>
                                <td>$data </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>integer</td>
                                <td>$from_id </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    boolean
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_server_set" name="method_swoole_server_set" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_server_set()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_server_set(\swoole_server  <span class="argument">$serv</span>,   <span class="argument">$arguments</span>) </pre>
                <p><em>swoole_server_set函数用于设置swoole_server运行时的各项参数</em></p>
                

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td><a href="../classes/swoole_server.html">\swoole_server</a></td>
                                <td>$serv </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td></td>
                                <td>$arguments </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_server_shutdown" name="method_swoole_server_shutdown" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_server_shutdown()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_server_shutdown(\swoole_server  <span class="argument">$serv</span>) : void</pre>
                <p><em>关闭服务器</em></p>
                <p>此函数可以用在worker进程内。</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td><a href="../classes/swoole_server.html">\swoole_server</a></td>
                                <td>$serv </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_server_start" name="method_swoole_server_start" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_server_start()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_server_start(\swoole_server  <span class="argument">$serv</span>) : boolean</pre>
                <p><em>启动server，监听所有TCP/UDP端口</em></p>
                <p>启动成功后会创建worker_num+2个进程。主进程+Manager进程+n*Worker进程。
启动失败扩展内会抛出致命错误，请检查php error_log的相关信息。errno={number}是标准的Linux Errno，可参考相关文档。
如果开启了log_file设置，信息会打印到指定的Log文件中。</p>
<p>如果想要在开机启动时，自动运行你的Server，可以在/etc/rc.local文件中加入:</p>
<p>/usr/bin/php /data/webroot/www.swoole.com/server.php</p>
<p>常见的错误有及拍错方法：</p>
<p>1、bind端口失败,原因是其他进程已占用了此端口
2、未设置必选回调函数，启动失败
3、php有代码致命错误，请检查php的错误信息
4、执行ulimit -c unlimited，打开core dump，查看是否有段错误
5、关闭daemonize，关闭log，使错误信息可以打印到屏幕</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td><a href="../classes/swoole_server.html">\swoole_server</a></td>
                                <td>$serv </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    boolean
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_server_task" name="method_swoole_server_task" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_server_task()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_server_task(\swoole_server  <span class="argument">$serv</span>, string  <span class="argument">$data</span>) : integer</pre>
                <p><em>投递异步任务到task_worker池中</em></p>
                <p>此函数会立即返回，worker进程可以继续处理新的请求。
此功能用于将慢速的任务异步地去执行，比如一个聊天室服务器，可以用它来进行发送广播。
当任务完成时，在task_worker中调用swoole_server_finish($serv, &quot;finish&quot;);
告诉worker进程此任务已完成。当然swoole_server_finish是可选的。</p>
<p>发送的$data必须为字符串，如果是数组或对象，请在业务代码中进行serialize处理，并在onTask/onFinish中进行unserialize。
$data可以为二进制数据，最大长度为8K。字符串可以使用gzip进行压缩。</p>
<p>使用swoole_server_task必须为Server设置onTask和onFinish回调，
否则swoole_server_start会失败。此回调函数会在task_worker进程中被调用。</p>
<p>函数会返回一个$task_id数字，表示此任务的ID。如果有finish回应，onFinish回调中会携带$task_id参数。</p>
<p>task_worker的数量在swoole_server_set参数中调整，如task_worker_num =&gt; 64，表示启动64个进程来接收异步任务。
swoole_server_task和swoole_server_finish可发送$data的长度最大不得超过8K，此参数受SW_BUFFER_SIZE宏控制。</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td><a href="../classes/swoole_server.html">\swoole_server</a></td>
                                <td>$serv </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>string</td>
                                <td>$data </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    integer
                                            &mdash; <p>$task_id</p>
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_server_taskwait" name="method_swoole_server_taskwait" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_server_taskwait()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_server_taskwait(string  <span class="argument">$task_data</span>, float  <span class="argument">$timeout = 0.5</span>) : string</pre>
                <p><em>投递堵塞任务到task进程池</em></p>
                <p>taskwait与task方法作用相同，用于投递一个异步的任务到task进程池去执行。
与task不同的是taskwait是阻塞等待的，直到任务完成或者超时返回。
$result为任务执行的结果，由$serv-&gt;finish函数发出。如果此任务超时，这里会返回false。</p>
<p>taskwait是阻塞接口，如果你的Server是全异步的请不要使用它</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td>string</td>
                                <td>$task_data </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td>float</td>
                                <td>$timeout </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    string
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_set_process_name" name="method_swoole_set_process_name" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_set_process_name()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_set_process_name(string  <span class="argument">$name</span>) : void</pre>
                <p><em>设置进程的名称</em></p>
                <p>修改进程名称后，通过ps命令看到的将不再是php your_file.php。而是设定的字符串。
此函数接受一个字符串参数。
此函数与PHP5.5提供的cli_set_process_title功能是相同的，但swoole_set_process_name可用于PHP5.2之上的任意版本。</p>

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td>string</td>
                                <td>$name </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_strerror" name="method_swoole_strerror" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_strerror()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_strerror(integer  <span class="argument">$errno</span>) </pre>
                <p><em>将标准的Unix Errno错误码转换成错误信息</em></p>
                

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td>integer</td>
                                <td>$errno </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_timer_add" name="method_swoole_timer_add" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_timer_add()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_timer_add(  <span class="argument">$interval</span>,   <span class="argument">$callback</span>) : integer</pre>
                <p><em>添加定时器，可用于客户端环境和fpm中</em></p>
                

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td></td>
                                <td>$interval </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td></td>
                                <td>$callback </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    integer
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_timer_after" name="method_swoole_timer_after" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_timer_after()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_timer_after(  <span class="argument">$ms</span>,   <span class="argument">$callback</span>,   <span class="argument">$user_param = null</span>) : integer</pre>
                <p><em>单次定时器，在N毫秒后执行回调函数</em></p>
                

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td></td>
                                <td>$ms </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td></td>
                                <td>$callback </td>
                                <td><p>function ($user_param)｛｝</p></td>
                            </tr>
                                                    <tr>
                                <td></td>
                                <td>$user_param </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    integer
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_timer_clear" name="method_swoole_timer_clear" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_timer_clear()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_timer_clear(  <span class="argument">$timer_id</span>) : boolean</pre>
                <p><em>删除定时器</em></p>
                

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td></td>
                                <td>$timer_id </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    boolean
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_timer_del" name="method_swoole_timer_del" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_timer_del()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_timer_del(  <span class="argument">$interval</span>) </pre>
                <p><em>删除定时器</em></p>
                

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td></td>
                                <td>$interval </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_timer_tick" name="method_swoole_timer_tick" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_timer_tick()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_timer_tick(  <span class="argument">$ms</span>,   <span class="argument">$callback</span>, null  <span class="argument">$params = null</span>) : integer</pre>
                <p><em>添加TICK定时器</em></p>
                

                                    <h4>Parameters</h4>
                    <table class="table table-condensed table-hover">
                                                    <tr>
                                <td></td>
                                <td>$ms </td>
                                <td></td>
                            </tr>
                                                    <tr>
                                <td></td>
                                <td>$callback </td>
                                <td><p>function($timmerID, $params){}</p></td>
                            </tr>
                                                    <tr>
                                <td>null</td>
                                <td>$params </td>
                                <td></td>
                            </tr>
                                            </table>
                
                
                                    <h4>Returns</h4>
                    integer
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                                        <div class="row-fluid">
        <div class="span8 content class">
            <a id="method_swoole_version" name="method_swoole_version" class="anchor"></a>
            <article class="method">
                <h3 class=" ">swoole_version()</h3>
                <a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
                <pre class="signature" style="margin-right: 54px;">swoole_version() : string</pre>
                <p><em>获取swoole扩展的版本号，如1.6.10</em></p>
                

                
                
                                    <h4>Returns</h4>
                    string
                                    				
                            </article>
        </div>
        <aside class="span4 detailsbar">
            <h1><i class="icon-arrow-down"></i></h1>
                                                            <dl>
                                    <dt>File</dt>
                    <dd><a href=""><div class="path-wrapper"></div></a></dd>
                                                                            </dl>
            <h2>Tags</h2>
            <table class="table table-condensed">
                                    <tr>
                        <th>
                            package
                        </th>
                        <td>
                                                                                            <p>Default</p>
                                                    </td>
                    </tr>
                            </table>
        </aside>
    </div>

                            
        </div>
    </section>

    <footer class="row-fluid">
        <section class="span10 offset2">
            <section class="row-fluid">
                <section class="span10 offset1">
                    <section class="row-fluid footer-sections">
                        <section class="span4">
                                                        <h1><i class="icon-code"></i></h1>
                            <div>
                                <ul>
                                                                            <li><a href="../namespaces/Swoole.html">\Swoole</a></li>
                                                                    </ul>
                            </div>
                        </section>
                        <section class="span4">
                                                        <h1><i class="icon-bar-chart"></i></h1>
                            <div>
                                <ul>
                                    <li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
                                </ul>
                            </div>
                        </section>
                        <section class="span4">
                                                        <h1><i class="icon-pushpin"></i></h1>
                            <div>
                                <ul>
                                    <li><a href="../reports/errors.html">Errors</a></li>
                                    <li><a href="../reports/markers.html">Markers</a></li>
                                </ul>
                            </div>
                        </section>
                    </section>
                </section>
            </section>
            <section class="row-fluid">
                <section class="span10 offset1">
                    <hr />
                    Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
                    on February 25th, 2016 at 20:01.
                </section>
            </section>
        </section>
    </footer>
</div>

</body>
</html>
